package com.example.touch.domain;

import android.app.Activity;

import com.example.touch.communication.entities.Action;

/**
*
* @author pla
*/
public abstract class AbstractActivityAction<T extends Action> implements IActivityAction
{
	protected abstract void executeAction();
	private Activity activity;
	private T action;
	
	public AbstractActivityAction(Activity activity, T action)
	{
		this.activity = activity;
		this.action = action;
	}
	
	public Activity getActivity()
	{
		return activity;
	}
	
	public void setActivity(Activity activity)
	{
		this.activity = activity;
	}
	
	public T getAction()
	{
		return action;
	}
	
	public void setAction(T action)
	{
		this.action = action;
	}

	public void invoke()
	{
		executeAction();
	}
}
